
/* jshint esversion:6 */

/**
 * @author: errorcpp@qq.com
 */


var xwindow = ("undefined" != typeof(window)) ? window : global;
xwindow.xlib = xwindow.xlib || {};
let xlib = xwindow.xlib;

let user_log4js = true;

if(true == user_log4js) {
    var log4js = require('log4js');
    var logger = log4js.getLogger();
    logger.level = 'ALL'; 

    xlib.trace = logger.trace.bind(logger);
    xlib.debug = logger.debug.bind(logger);
    xlib.info  = logger.info.bind(logger);
    xlib.warn  = logger.warn.bind(logger);
    xlib.trace = logger.trace.bind(logger);
}
else{
    xlib.trace = console.trace;
    xlib.debug = console.debug;
    xlib.info  = console.info;
    xlib.warn  = console.warn;
    xlib.trace = console.trace;
}


